function inc(x) {
    return x + 1
}
var a = 1;
var res;
res = inc(a)
    // console.log(res);
    // console.log(a);

// function inc() {
//     x = a;
//     return x + 1
// }
// 函数的运行不会改变实参

var array1 = [
        [1, 2],
        [3, 4],
        [7, 9]
    ]
    // console.log(array1)

function changeArray(arr) {
    // arr = array1
    arr[0][1] = "改变一下";
    return arr
}
// changeArray(array1)
// console.log(array1)
var x = 1;
var y = x;
x = x + 1;
// console.log(x);
// console.log(y);
var arX = [
    [1, 2],
    [3, 4],
    [7, 9]
]
var arY = arX;
arY[1][1] = "haha";
console.log(arX);
console.log(arY)

function testReurn() {
    console.log('沙发！')
    return 1
    console.log("2楼")
    console.log("楼上是sb")

}
var r = testReurn();
// console.log(r)
var ages = [10, 18, 20, 34, 12];

function test(arr) {
    for (item of ages) {
        if (item >= 18) {
            break
        }

    }
    console.log("没有18以上的")
}

function func_2() {
    var a = 10,
        b = 20;
    return [a, b];
}
console.log(func_2())